package mlz.a_junit;

import org.junit.*;

public class StringUtilDemo {
    /*public static void main(String[] args) {

    }*/

    @Test
    public void test01(){
        StringUtil.printNumber("你好世界");
        StringUtil.printNumber(null);
    }

    @Test
    public void test02(){
        int index1 = StringUtil.getMaxIndex("你好啊世界");
        System.out.println(index1);

        int index2 = StringUtil.getMaxIndex(null);
        System.out.println(index2);

        //断言测试
        Assert.assertEquals("方法内部的bug",5,index1);
    }


    @Before
    public void test03(){
        System.out.println(" before 执行了~~");
    }

    @After
    public void test04(){
        System.out.println(" after 执行了~~");
    }

    @BeforeClass
    public static void test033(){
        System.out.println(" before 执行了~~");
    }

    @AfterClass
    public static void test044(){
        System.out.println(" after 执行了~~");
    }
}



